package com.example.aicooking.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("works")
public class Works {
    @TableId(type = IdType.AUTO)
    private Long worksId;
    private Long userId;
    private Integer recipeId;
    private Long photoId;
    private String worksName;
    private String description;
    private Integer cookingTime;
    private String difficulty;
    private Integer commentCount;
    private Integer likeCount;
    private Integer status;
    // 额外的显示字段，不在数据库中
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String photoUrl;
}
